// Binary-Search tree is the tree, with the key of each internal node
// being greate than keys int the respective node's left subtree
// and less than the ones in its right subtree

// For more details check out those links below there:
// Wikipedia article: https://en.wikipedia.org/wiki/Binary_search_tree
// authors [guuzaa](https://github.com/guuzaa)

package tree

import "yjh.com/TheAlgorithm/Go/constraints"

type Node[T constraints.Ordered] interface {
	Key() T
	Parent() Node[T]
	Left() Node[T]
	Right() Node[T]
}

// The following is a collection of helper function for BinarySearch, AVL and RB

func accessNodeByLayerHelper[T constraints.Ordered](root, nilNode Node[T]) [][]T {
	if root == nilNode {
		return [][]T{}
	}
	var q []Node[T]
	var n Node[T]
}
